<?php /* Smarty version 2.6.18, created on 2017-01-03 14:03:22
         compiled from main/demand.list.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="get">	
                <div class="box-header with-border">
                    <span class="fa fa-search" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">查询</p>
                </div>
                   <div class="box-body">
                        <div class="col-md-2 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-5 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
							   报修人：
						  </label>
						  <div class="input-group col-md-7 col-xs-12">
							   <select class="form-control" name="main_name">
									 <option value="">全部</option>	
							   <?php $_from = $this->_tpl_vars['main_names']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
									  <option value="<?php echo $this->_tpl_vars['value']['user_name']; ?>
"<?php if ($this->_tpl_vars['value']['user_name'] == $this->_tpl_vars['main_name']): ?>selected<?php endif; ?> ><?php echo $this->_tpl_vars['value']['user_name']; ?>
</option>
							   <?php endforeach; endif; unset($_from); ?>
                                </select>
						  </div> 
				    </div>
					<div class="col-md-3 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-5 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   维修单位：
						  </label>
						  <div class="input-group col-md-7 col-xs-12">
							   <select class="form-control" name="maince_com">
									<option value="" >全部</option>	
							   <?php $_from = $this->_tpl_vars['maince_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
									<option value="<?php echo $this->_tpl_vars['value']['maince_com']; ?>
"<?php if ($this->_tpl_vars['value']['maince_com'] == $this->_tpl_vars['maince_com']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['value']['maince_com']; ?>
</option>
							   <?php endforeach; endif; unset($_from); ?>
									  
                                </select>
						  </div> 
				    </div>
                    <div class="col-md-2 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-6 control-label text-right"  style="padding-right:0; padding-left:0; font-weight:500;">
							   结算类型：
						  </label>
						  <div class="input-group col-md-6 col-xs-12">
							   <select class="form-control" name="is_show">
									  <option value="" >全部</option>
									<?php $_from = $this->_tpl_vars['is_shows']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
									  <option value="<?php echo $this->_tpl_vars['key']; ?>
"<?php if ($this->_tpl_vars['key'] == $this->_tpl_vars['is_show']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['value']; ?>
</option>
									<?php endforeach; endif; unset($_from); ?>
                                </select>
						  </div> 
				    </div>
					<div class="col-md-4 col-xs-12 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-3 control-label text-right" style=" font-weight:500; ">
							   时间：
						  </label>
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['from']; ?>
" id="from" name="from">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['to']; ?>
" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>

					<div class="col-sm-1">
						<input type="hidden" name="a" value="main.demandlist">
					   <button type="submit" class="btn btn-warning">查 询</button>
					</div>
					<div style="clear:both; height:10px;"></div>
                        <table class="table table-bordered table-striped" id="mytable">
                                <thead>
                                    <tr style="background-color:#5fb2dc;">
                                        <td>报修人</td>
                                        <td>完成日期</td>
                                        <td>维修单位</td>
                                        <td>维修内容</td>
                                        <td>结算类型</td>
										<td>备注</td>
										<td width="90">操作</td>
                                    </tr>
                                </thead>
                                <tbody>
								<?php $_from = $this->_tpl_vars['main_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <tr>
									    <td><?php echo $this->_tpl_vars['value']['user_name']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['maintain_time']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['maince_com']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['main_content']; ?>
</td>
                                        <td><?php echo $this->_tpl_vars['value']['is_show']; ?>
</td>
										<td><?php echo $this->_tpl_vars['value']['main_remark']; ?>
</td>
										<td>
                                        	<a href="index.php?a=main.maintaindetails&main_id=<?php echo $this->_tpl_vars['value']['main_id']; ?>
&is_show=1&main_type=chaxun" class="btn btn-success btn-sm" title="查看"><i class="fa fa-search"></i> </a>
                                        </td>
                                    </tr>
								<?php endforeach; endif; unset($_from); ?>
                            </tbody>
                        </table>                     
				   </div><!--box-body -->
               </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
</script>